import axios from '@/utils/request'

export function shopListPage(params) {
  return axios({
    url: '/shop/shopList/page',
    method: 'get',
    params
  })
}

export function deleteShop(id) {
  return axios({
    url: '/shop/shopList/del',
    method: 'get',
    params: {
      id: id
    }
  })
}

export function deleteShopBatch(ids) {
  return axios({
    url: '/shop/shopList/delBatch',
    method: 'get',
    params: {
      ids: ids
    }
  })
}

export function addShop(data) {
  return axios({
    url: '/shop/shopList/add',
    method: 'post',
    data
  })
}

export function shopInfo(id) {
  return axios({
    url: '/shop/shopList/shopInfo',
    method: 'get',
    params: {
      id: id
    }
  })
}

export function updateShop(data) {
  return axios({
    url: '/shop/shopList/update',
    method: 'post',
    data
  })
}

export function getShops(prarms) {
  return axios({
    url: '/shop/shopList/shops',
    method: 'get',
    prarms
  })
}